﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KOPLibrary.Forms.CashFlow
{
    public class CacheflowUserControlBase : UserControl
    {
        protected Cacheflow.CacheflowDs currentDataSource = null;
        public event EventHandler BeforeCommit = null;            

        public virtual void Bind(Cacheflow.CacheflowDs ds)
        {
            currentDataSource = ds;
        }

        public virtual void Commit()
        {
            DoBeforeCommit();
        }

        protected virtual void DoBeforeCommit()
        {
            if (BeforeCommit != null)
                BeforeCommit(this, EventArgs.Empty);
        }
    }
}
